﻿@model IEnumerable<NUS.ISS.ARS.BusinessEntity.ViewModels.FlightReportView>

@if (Model.Count() == 0)
{
    <h3 class="text-error">No items matched your search query</h3>
}
else
{
    <table cellpadding="20">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.FlightNumber)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.AirportFrom)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.AirportTo)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CustomerId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CustomerName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CustomerContact)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.PassengerName)
            </th>
        </tr>  

    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.FlightNumber)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.AirportFrom)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.AirportTo)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CustomerId)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CustomerName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CustomerContact)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PassengerName)
            </td>
        </tr>
    }
    </table>
}
